package com.mmy.fta.usercenter.api;

import com.mmy.fta.usercenter.request.DriverMemberShipRequest;
import com.mmy.fta.usercenter.request.DriverRenewRequest;
import com.mmy.fta.usercenter.request.ImmediateRenewRequest;
import com.mmy.fta.usercenter.request.ShipperMemberShipRequest;
import com.ymm.common.rpc.YmmResult;

import java.util.Date;

/**
 * @apiNote 会员中心service
 * @author qingyu.meng
 * @date 2021年10月29日 10:49 上午
 */

public interface MembershipService {
    /**
     * 开通会员
     * @param openId
     * @return
     */
    YmmResult<Date> openMembership(String openId);

    YmmResult membershipEndTime(String openId) ;
    /**
     * 使用免技术服务费
     * @param openId
     * @return
     */
    YmmResult useFreeTime(String openId);

    YmmResult continueMembership(String openId);

    YmmResult driverImmediateRenew(String openId);

    YmmResult shipperImmediateRenew(String token);

    YmmResult driverRenew(DriverMemberShipRequest driverMemberShipRequest);

    YmmResult shipperRenew(ShipperMemberShipRequest shipperMemberShipRequest);

//    YmmResult driverRenew(DriverRenewRequest driverRenewRequest);

    boolean driverIsColdMembership(String driverOpenId);


    /**
     * 货主收货后，给会员货主增加月成交数
     * @param shipperOpenId
     */
    void addShipperMembershipMonthDeals(String shipperOpenId);

    /**
     * 货主收货后，给会员司机增加月里程数
     *
     */
    void addDriverMembershipMonthMileage(String driverOpenId,Integer mileage);
}
